package com.momo.common.req.sysSetting.user;

import com.momo.common.error.BaseReq;
import lombok.*;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created by Kagome on 2019/4/20.
 */
@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
//@EqualsAndHashCode(of = {"id"})
public class SysUserReq extends BaseReq {

    /**
     * sysUserUuid 唯一，32位字符串，查询用.
     */
    @NotBlank(message = "UUID 必填", groups = {Status.class, Detail.class, Modify.class, Permission.class})
    private String sysUserUuid;
    private String userGroupUuid;
    /**
     * isForbidden 是否被禁用  0否 1禁用.
     */
    @NotBlank(message = "是否被禁用 必填", groups = {Status.class, Add.class, Modify.class})
    private String isForbidden;
    /**
     * sysUserPwd 密码.
     */
    @NotBlank(message = "密码 必填", groups = {Add.class, Permission.class})
    private String sysUserPwd;
    @NotBlank(message = "确认密码 必填", groups = {Permission.class})
    private String checkPass;
    /**
     * sysUserName 姓名.
     */
    @NotBlank(message = "姓名 必填", groups = {Add.class, Modify.class})
    private String sysUserName;
    /**
     * sysUserEmail 邮箱.
     */
    @NotBlank(message = "邮箱 必填", groups = {Add.class, Modify.class})
    @Email(message = "邮箱格式不正确", groups = {Add.class, Modify.class})
    private String sysUserEmail;
    /**
     * sysUserPhone 手机号.
     */
    @NotBlank(message = "手机号 必填", groups = {Add.class, Modify.class})
    private String sysUserPhone;

    /**
     * sysUserLoginName 登录名.
     */
    @NotBlank(message = "登录名 必填", groups = {Add.class, Modify.class})
    private String sysUserLoginName;

    /**
     * sysLoginNumber 账号允许登录的次数 -1 不限次数 ，如需登录次数为0，请禁用该账号，减少代码复杂度.
     */
    @NotNull(message = "账号允许登录的次数 必填", groups = {Add.class, Modify.class})
    private Integer sysLoginNumber;

}
